/* 
使用格式:
    1.引入公用样式表
    2.引入当前样式表
    3.引入公用js模块
    4.具体功能

*/

// 1.引入公用样式表
require("../../assets/css/index.less");
require("../../assets/fonts/iconfont.css");
let https = require("../../utils/https.js");
let local = require("../../utils/local.js");
// 2.引入当前样式表
require("./my.less");

// 3.引入公用js模块
let dom = require("../../utils/dom.js");
// let http = require('../../utils/http.js');
// 4.具体功能
//获取当前页面中的单个节点
// console.log(dom.getEle('h1'));
//获取当前页面中的多个节点
// console.log(dom.getEles('h1'));

dom.ready(function () {
	dom.contFooter("my");
	dom.jump(".head", "revise");
	dom.jump(".data-tops", "myData");
	https.get("/api/user/info", function (res) {
		console.log(res);
		if (res.errno == 0) {
			dom.getEle(".phote").src = https.BASE_URL + res.data.imgUrl;
			dom.getEle(".usename").innerHTML = res.data.nickName;
			dom.getEle(".sigtext").innerHTML = res.data.sign;
			local.set("userInfo", res.data);
		}
	});

	dom.getEle(".phote").src = https.BASE_URL + a.imgUrl;
	dom.getEle(".usename").innerHTML = a.nickName;
	dom.getEle(".sigtext").innerHTML = a.sign;
});
